<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">

</head>

<body style="
margin: 0 !important;
padding: 0 !important;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
">


    <div id="editor" style="
margin: 0 !important;
padding: 0 !important;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
">
    </div>
    <!-- <script src="//unpkg.com/promise-polyfill@8.1.3/dist/polyfill.min.js"></script> -->
    <script type="text/javascript">
        !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).WebOfficeSDK={})}(this,function(e){"use strict";var t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function n(e,t,n,r){return new(n||(n=Promise))(function(a,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}c((r=r.apply(e,t||[])).next())})}function r(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var a,i,o,s,c=function(){function e(){}return e.add=function(t){e.HANDLE_LIST.push(t),window.addEventListener("message",t,!1)},e.remove=function(t){var n=e.HANDLE_LIST.indexOf(t);n>=0&&e.HANDLE_LIST.splice(n,1),window.removeEventListener("message",t,!1)},e.empty=function(){for(;e.HANDLE_LIST.length;)window.removeEventListener("message",e.HANDLE_LIST.shift(),!1)},e.parse=function(e){return"object"==typeof e?e:e?JSON.parse(e):e},e.HANDLE_LIST=[],e}();function u(e){return"[object Function]"==={}.toString.call(e)}!function(e){e.unknown="unknown",e.spreadsheet="s",e.writer="w",e.presentation="p",e.pdf="f"}(a||(a={})),function(e){e.wps="w",e.et="s",e.presentation="p",e.pdf="f"}(i||(i={})),function(e){e.nomal="nomal",e.simple="simple"}(o||(o={})),function(e){e[e.requestFullscreen=1]="requestFullscreen",e[e.exitFullscreen=0]="exitFullscreen"}(s||(s={}));var l,d,p=(l=0,function(){return l+=1}),f=function(e,t,n){void 0===n&&(n=!0);var r=t;if(!d){var a=function(e){d.style.cssText+="height: "+e.clientHeight+"px; width: "+e.clientWidth+"px"}.bind(null,r);(d=document.createElement("iframe")).classList.add("web-office-iframe");var i={id:"office-iframe",src:e,scrolling:"no",frameborder:"0",allowfullscreen:"allowfullscreen",webkitallowfullscreen:"true",mozallowfullscreen:"true"};for(var o in r?(i.style="width: "+r.clientWidth+"px; height: "+r.clientHeight+"px;",n&&window.addEventListener("resize",a)):((r=document.createElement("div")).classList.add("web-office-default-container"),function(e){var t=document.createElement("style");document.head.appendChild(t);var n=t.sheet;n.insertRule(e,n.cssRules.length)}(".web-office-default-container {position: absolute; padding: 0;  margin: 0; width: 100vw; height: 100vh; left: 0; top: 0;}"),document.body.appendChild(r),i.style="width: 100vw; height: 100vh;"),i)d.setAttribute(o,i[o]);r.appendChild(d),d.destroy=function(){d.parentNode.removeChild(d),d=null,window.removeEventListener("resize",a)}}return d};var v=function(e){f().contentWindow.postMessage(JSON.stringify(e),"*")};function b(e,t,n){return new Promise(function(r){var a=p(),i=function(e){var t=c.parse(e.data);t.eventName===n&&t.msgId===a&&(r(t.data),c.remove(i))};c.add(i),v({data:e,msgId:a,eventName:t})})}var h=function(e){return b(e,"wps.jssdk.api","wps.api.reply")},m=function(e){return b(e,"api.basic","api.basic.reply")},w={idMap:{}};function g(e){return n(this,void 0,void 0,function(){var t,n,a,i,o,s,u,l,d,p;return r(this,function(r){switch(r.label){case 0:return t=c.parse(e.data),n=t.eventName,a=t.callbackId,i=t.data,a?(o=w.idMap[a])?(s=o.split(":"),u=s[0],l=s[1],"api.callback"===n&&w[u]&&w[u][l]?[4,(p=w[u][l]).callback.apply(p,i.args)]:[3,2]):[3,2]:[3,2];case 1:d=r.sent(),v({result:d,callbackId:a,eventName:"api.callback.reply"}),r.label=2;case 2:return[2]}})})}var y=function(e){return n(void 0,void 0,void 0,function(){function t(){return Object.keys(w.idMap).find(function(e){return w.idMap[e]===a+":"+n})}var n,a,i,o,s,u,l,d,p;return r(this,function(r){switch(r.label){case 0:return n=e.prop,a=e.parentObjId,[4,j([i=e.value])];case 1:return o=r.sent(),s=o[0],u=o[1],e.value=s[0],l=Object.keys(u)[0],d=w[a],null===i&&d&&d[n]&&((p=t())&&delete w.idMap[p],delete d[n],Object.keys(d).length||delete w[a],Object.keys(w.idMap).length||c.remove(g)),l&&(Object.keys(w.idMap).length||c.add(g),w[a]||(w[a]={}),w[a][n]={callbackId:l,callback:u[l]},(p=t())&&delete w.idMap[p],w.idMap[l]=a+":"+n),[2]}})})},k=function(e,a,i,o){return n(void 0,void 0,void 0,function(){var s,u,l,d,f,b,h,m;return r(this,function(w){switch(w.label){case 0:return s=p(),d=new Promise(function(e,t){u=e,l=t}),f={},a.args?[4,j(a.args)]:[3,2];case 1:b=w.sent(),h=b[0],m=b[1],a.args=h,f=m,w.label=2;case 2:return"api.setter"!==e?[3,4]:[4,y(a)];case 3:w.sent(),w.label=4;case 4:return function(e){var n=e[0],r=e[1];"function"==typeof(n=t({},n)).data&&(n.data=n.data());r(),v(n)}([{eventName:e,data:a,msgId:s},function(){var t=this,a=function(d){return n(t,void 0,void 0,function(){var t,n,p;return r(this,function(r){switch(r.label){case 0:return"api.callback"===(t=c.parse(d.data)).eventName&&t.callbackId&&f[t.callbackId]?[4,f[t.callbackId].apply(f,t.data.args)]:[3,2];case 1:n=r.sent(),v({result:n,eventName:"api.callback.reply",callbackId:t.callbackId}),r.label=2;case 2:return t.eventName===e+".reply"&&t.msgId===s&&(t.error?((p=new Error("")).stack=t.error+"\n"+i,o&&o(),l(p)):u(t.result),c.remove(a)),[2]}})})};return c.add(a),d}]),[2,d]}})})};function j(e){return n(this,void 0,void 0,function(){var t,n,a,i,o,s,c,u,l,d,f;return r(this,function(r){switch(r.label){case 0:t={},n=[],a=e.slice(0),r.label=1;case 1:return a.length?(i=void 0,[4,a.shift()]):[3,13];case 2:return(o=r.sent())&&o.done?[4,o.done()]:[3,4];case 3:r.sent(),r.label=4;case 4:if(!function(e){if(!e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(i))return[3,11];for(c in i={},s=[],o)s.push(c);u=0,r.label=5;case 5:return u<s.length?(l=s[u],d=o[l],/^[A-Z]/.test(l)?d&&d.done?[4,d.done()]:[3,7]:[3,8]):[3,10];case 6:r.sent(),r.label=7;case 7:d&&d.objId?d={objId:d.objId}:"function"==typeof d&&(f=p(),t[f]=d,d={callbackId:f}),r.label=8;case 8:i[l]=d,r.label=9;case 9:return u++,[3,5];case 10:return[3,12];case 11:o&&o.objId?i={objId:o.objId}:"function"==typeof o&&void 0===o.objId?(f=p(),t[f]=o,i={callbackId:f}):i=o,r.label=12;case 12:return n.push(i),[3,1];case 13:return[2,[n,t]]}})})}var I=function(e,n){void 0===n&&(n=!0);var r=t({},e),a=r.headers,i=void 0===a?{}:a,s=r.subscriptions,c=void 0===s?{}:s,u=r.mode,l=void 0===u?o.nomal:u,d=r.commonOptions,p=i.backBtn,f=void 0===p?{}:p,v=i.shareBtn,b=void 0===v?{}:v,h=i.otherMenuBtn,m=void 0===h?{}:h,w=function(e,t){e.subscribe&&"function"==typeof e.subscribe&&(e.callback=t,c[t]=e.subscribe,n&&delete e.subscribe)};if(w(f,"wpsconfig_back_btn"),w(b,"wpsconfig_share_btn"),w(m,"wpsconfig_other_menu_btn"),m.items&&Array.isArray(m.items)){var g=[];m.items.forEach(function(e,t){switch(void 0===e&&(e={}),e.type){case"export_img":e.type=1,e.callback="export_img";break;case"export_pdf":e.type=1,e.callback="export_pdf";break;case"save_version":e.type=1,e.callback="save_version";break;case"about_wps":e.type=1,e.callback="about_wps";break;case"split_line":e.type=2;break;case"custom":e.type=3,w(e,"wpsconfig_other_menu_btn_"+t),g.push(e)}}),g.length&&(E||S)&&(m.items=g)}if(r.url=r.url||r.wpsUrl,(l===o.simple||d&&!1===d.isShowTopArea)&&r.url&&(r.url+="&simple&hidecmb"),r.debug&&r.url&&(r.url+="&debugger"),d&&(d.isParentFullscreen||d.isBrowserViewFullscreen)&&document.addEventListener("fullscreenchange",T),r.wordOptions&&(r.wpsOptions=r.wordOptions),r.excelOptions&&(r.etOptions=r.excelOptions),r.pptOptions&&(r.wppOptions=r.pptOptions),"object"==typeof c.print){var y="wpsconfig_print";"function"==typeof c.print.subscribe&&(c[y]=c.print.subscribe,r.print={callback:y},void 0!==c.print.custom&&(r.print.custom=c.print.custom)),delete c.print}"function"==typeof c.exportPdf&&(c[y="wpsconfig_export_pdf"]=c.exportPdf,r.exportPdf={callback:y},delete c.exportPdf);return r.commandBars&&_(r.commandBars,!1),t(t({},r),{subscriptions:c})},O=function(e){void 0===e&&(e="");var t="";if(!t&&e){var n=e.toLowerCase();-1!==n.indexOf("/office/s/")&&(t=a.spreadsheet),-1!==n.indexOf("/office/w/")&&(t=a.writer),-1!==n.indexOf("/office/p/")&&(t=a.presentation),-1!==n.indexOf("/office/f/")&&(t=a.pdf)}if(!t){var r=e.match(/[\?&]type=([a-z]+)/)||[];t=i[r[1]]||""}return t};function _(e,t){void 0===t&&(t=!0);var n=e.map(function(e){var t=e.attributes;if(!Array.isArray(t)){var n=[];for(var r in t)if(t.hasOwnProperty(r)){var a={name:r,value:t[r]};n.push(a)}e.attributes=n}return e});return t&&v({data:n,eventName:"setCommandBars"}),n}var x=window.navigator.userAgent.toLowerCase(),E=/Android|webOS|iPhone|iPod|BlackBerry|iPad/i.test(x),S=function(){try{return-1!==window._parent.location.search.indexOf("from=wxminiprogram")}catch(e){return!1}}();function T(){var e={status:s.requestFullscreen};document.fullscreenElement?e.status=s.requestFullscreen:e.status=s.exitFullscreen,v({data:e,eventName:"fullscreenchange"})}var N=0,C=new Set;function P(e){return N+=1,!e&&function(e){C.forEach(function(t){return t(e)})}(N),N}function L(e,i){var o,s=this,u=i.Events,l=i.Enum,d=i.Props,p=d[0],f=d[1],b={objId:N};switch(function e(n,r,a){var i=r.slice(0);var o=function(){var r=i.shift();!r.alias&&~A.indexOf(r.prop)&&i.push(t(t({},r),{alias:r.prop+"Async"})),Object.defineProperty(n,r.alias||r.prop,{get:function(){var i=this,o=1===r.cache,s=o&&this["__"+r.prop+"CacheValue"];if(!s){var c=new Error(""),u=c.stack.split("\n").slice(2).join("\n"),l=P(o),d=function(){for(var e,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];void 0!==r.caller?function e(n,r,a){var i=r.slice(0);var o=function(){var r=i.shift();!r.alias&&~A.indexOf(r.prop)&&i.push(t(t({},r),{alias:r.prop+"Async"})),Object.defineProperty(n,r.alias||r.prop,{get:function(){var t=this,i=1===r.cache,o=i&&this["__"+r.prop+"CacheValue"];if(!o){var s=new Error(""),c=s.stack.split("\n").slice(2).join("\n"),u=P(i),l=function(){for(var t,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];void 0!==r.caller?e(t={objId:P()},a[r.caller],a):t={};return B(l,t,"api.caller",{obj:l,args:i,parentObjId:n.objId,objId:t.objId,prop:r.prop},c),t};return l.objId=-1,void 0!==r.getter&&(l.objId=u,e(l,a[r.getter],a)),B(n,l,"api.getter",{parentObjId:n.objId,objId:l.objId,prop:r.prop},c,function(){delete t["__"+r.prop+"CacheValue"]}),i&&(this["__"+r.prop+"CacheValue"]=l),l}return o},set:function(e){var t=new Error(""),a=t.stack.split("\n").slice(2).join("\n");return B(n,{},"api.setter",{value:e,parentObjId:n.objId,objId:-1,prop:r.prop},a)}})};for(;i.length;)o()}(e={objId:P()},a[r.caller],a):e={};return B(d,e,"api.caller",{obj:d,args:i,parentObjId:n.objId,objId:e.objId,prop:r.prop},u),e};return d.objId=-1,void 0!==r.getter&&(d.objId=l,e(d,a[r.getter],a)),B(n,d,"api.getter",{parentObjId:n.objId,objId:d.objId,prop:r.prop},u,function(){delete i["__"+r.prop+"CacheValue"]}),o&&(this["__"+r.prop+"CacheValue"]=d),d}return s},set:function(e){var t=new Error(""),a=t.stack.split("\n").slice(2).join("\n");return B(n,{},"api.setter",{value:e,parentObjId:n.objId,objId:-1,prop:r.prop},a)}})};for(;i.length;)o()}(b,p,f),b.Events=u,b.Enum=l,e.Enum=b.Enum,e.Events=b.Events,e.Props=d,O(e.url)){case a.writer:e.WordApplication=e.WpsApplication=function(){return b};break;case a.spreadsheet:e.ExcelApplication=e.EtApplication=function(){return b};break;case a.presentation:e.PPTApplication=e.WppApplication=function(){return b};break;case a.pdf:e.PDFApplication=function(){return b}}e.Application=b,e.Free=function(e){return k("api.free",{objId:e},"")},e.Stack=b.Stack=(o=function(t){e&&e.Free(t)},function(){var e=[],t=function(t){e.push(t)};return C.add(t),{End:function(){o(e),C.delete(t)}}});var h={};c.add(function(e){return n(s,void 0,void 0,function(){var t,n,a,i,o;return r(this,function(r){switch(r.label){case 0:return"api.event"===(t=c.parse(e.data)).eventName&&t.data?(n=t.data,a=n.eventName,i=n.data,(o=h[a])?[4,o(i)]:[3,2]):[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})}),b.Sub={},Object.values(u).forEach(function(e){Object.defineProperty(b.Sub,e,{set:function(t){h[e]=t,v({eventName:"api.event.register",data:{eventName:e,register:!!t,objId:N+=1}})}})})}var A=["ExportAsFixedFormat","GetOperatorsInfo","ImportDataIntoFields","ReplaceText","ReplaceBookmark","GetBookmarkText","GetComments"];function F(e,n,r){var a=n.slice(0);var i=function(){var n=a.shift();if(!n.alias&&~A.indexOf(n.prop)){a.push(t(t({},n),{alias:n.prop+"Async"}))}Object.defineProperty(e,n.alias||n.prop,{get:function(){var t=this;var a=n.cache===1;var i=a&&this["__"+n.prop+"CacheValue"];if(!i){var o=new Error("");var s=o.stack.split("\n").slice(2).join("\n");var c=P(a);var u=function(){for(var t=[],a=0,i;a<arguments.length;a++){t[a]=arguments[a]}if(n.caller!==undefined){i={objId:P()};F(i,r[n.caller],r)}else{i={}}return B(l,i,"api.caller",{obj:l,args:t,parentObjId:e.objId,objId:i.objId,prop:n.prop},s),i};var l=u;l.objId=-1;if(n.getter!==undefined){l.objId=c;F(l,r[n.getter],r)}B(e,l,"api.getter",{parentObjId:e.objId,objId:l.objId,prop:n.prop},s,function(){delete t["__"+n.prop+"CacheValue"]});if(a){this["__"+n.prop+"CacheValue"]=l}return l}return i},set:function(t){var r=new Error("");var a=r.stack.split("\n").slice(2).join("\n");return B(e,{},"api.setter",{value:t,parentObjId:e.objId,objId:-1,prop:n.prop},a)}})};while(a.length){i()}}function B(e,t,n,r,a,i){var o,s=(e.done?e.done():Promise.resolve()).then(function(){return o||(o=k(n,r,a,i)),o});t.done=function(){return s},t.then=function(e,n){return r.objId>=0?(t.then=null,t.catch=null,e(t)):s.then(e,n)},t.catch=function(e){return s.catch(e)},t.Destroy=function(){return k("api.free",{objId:t.objId},"")}}var D=null,H={fileOpen:"fileOpen",tabSwitch:"tabSwitch",fileSaved:"fileSaved",fileStatus:"fileStatus",error:"error",stage:"stage"},R={getToken:"api.getToken",onToast:"event.toast",onHyperLinkOpen:"event.hyperLinkOpen"};function M(e,a,i,o,s,u,l){var d=this;void 0===i&&(i={});c.add(function(p){return n(d,void 0,void 0,function(){var n,d,f,b,h,m,w,g,y,k,j,I,O;return r(this,function(r){switch(r.label){case 0:return n=c.parse(p.data),d=n.eventName,f=void 0===d?"":d,b=n.data,h=void 0===b?null:b,m=n.url,w=void 0===m?null:m,-1!==["wps.jssdk.api"].indexOf(f)?[2]:"ready"!==f?[3,1]:(v({eventName:"setConfig",data:t(t({},i),{version:e.version})}),e.tokenData&&e.setToken(t(t({},e.tokenData),{hasRefreshTokenConfig:!!i.refreshToken})),s.apiReadySended&&v({eventName:"api.ready"}),e.iframeReady=!0,[3,12]);case 1:return"error"!==f?[3,2]:(a.emit(H.error,h),[3,12]);case 2:return"open.result"!==f?[3,3]:(a.emit(H.fileOpen,h),[3,12]);case 3:return"file.saved"!==f?[3,4]:(a.emit(H.fileStatus,h),a.emit(H.fileSaved,h),[3,12]);case 4:return"tab.switch"!==f?[3,5]:(a.emit(H.tabSwitch,h),[3,12]);case 5:return"api.scroll"!==f?[3,6]:(window.scrollTo(h.x,h.y),[3,12]);case 6:if(f!==R.getToken)return[3,11];g={token:!1},r.label=7;case 7:return r.trys.push([7,9,,10]),[4,s.refreshToken()];case 8:return g=r.sent(),[3,10];case 9:return y=r.sent(),console.error("refreshToken: "+(y||"fail to get")),[3,10];case 10:return v({eventName:R.getToken+".reply",data:g}),[3,12];case 11:f===R.onToast?s.onToast(h):f===R.onHyperLinkOpen?s.onHyperLinkOpen(h):"stage"===f?a.emit(H.stage,h):"event.callback"===f?(k=h.eventName,j=h.data,i.commonOptions&&"fullscreenchange"===k?(I=j.status,O=j.isDispatchEvent,i.commonOptions.isBrowserViewFullscreen?function(e,t,n,r){0===e?t.style="position: static; width: "+n.width+"; height: "+n.height:1===e&&(t.style="position: absolute; width: 100%; height: 100%"),r&&function(e){["fullscreen","fullscreenElement"].forEach(function(t){Object.defineProperty(document,t,{get:function(){return!!e.status},configurable:!0})});var t=new CustomEvent("fullscreenchange");document.dispatchEvent(t)}({status:e})}(I,u,l,O):i.commonOptions.isParentFullscreen&&(function(e,t){if(0===e){var n=document,r=n.exitFullscreen||n.mozCancelFullScreen||n.msExitFullscreen||n.webkitCancelFullScreen||n.webkitExitFullscreen;r.call(document)}else if(1===e){var a=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen;a.call(t)}}(I,u),a.emit(k,j))):a.emit(k,j)):"api.ready"===f&&L(e,h),r.label=12;case 12:return"function"==typeof o[f]&&o[f](e,w||h),[2]}})})})}function V(e){return new Promise(function(t){var n=function(r){c.parse(r.data).eventName===e&&(t(),c.remove(n))};c.add(n)})}function W(e){void 0===e&&(e={}),D&&D.destroy();try{var t=I(e),a=t.subscriptions,i=void 0===a?{}:a,o=t.mount,s=void 0===o?null:o,l=t.url,d=t.refreshToken,p=t.onToast,b=t.onHyperLinkOpen,w=f(l,s),g=V("ready"),y=V("api.ready"),k=s?{width:s.clientWidth+"px",height:s.clientHeight+"px"}:{width:"100vw",height:"100vh"};delete t.mount,l&&delete t.url,delete t.subscriptions;var j=(x=x||Object.create(null),{on:function(e,t){(x[e]||(x[e]=[])).push(t)},off:function(e,t){x[e]&&x[e].splice(x[e].indexOf(t)>>>0,1)},emit:function(e,t){(x[e]||[]).slice().map(function(e){e(t)}),(x["*"]||[]).slice().map(function(n){n(e,t)})}}),O={apiReadySended:!1};return D={url:l,iframe:w,version:"1.1.5",iframeReady:!1,tokenData:null,commandBars:null,tabs:{getTabs:function(){return n(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,g];case 1:return e.sent(),[2,m({api:"tab.getTabs"})]}})})},switchTab:function(e){return n(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,g];case 1:return t.sent(),[2,m({api:"tab.switchTab",args:{tabKey:e}})]}})})}},setCooperUserColor:function(e){return n(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,g];case 1:return t.sent(),[2,m({api:"setCooperUserColor",args:e})]}})})},setToken:function(e){return n(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,g];case 1:return t.sent(),D.tokenData=e,v({eventName:"setToken",data:e}),[2]}})})},ready:function(){return n(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return O.apiReadySended||(O.apiReadySended=!0,v({eventName:"api.ready"})),[4,y];case 1:return e.sent(),[4,new Promise(function(e){return setTimeout(e,0)})];case 2:return e.sent(),[2]}})})},destroy:function(){w.destroy(),c.empty(),D=null,C=new Set,N=0},save:function(){return n(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,g];case 1:return e.sent(),[2,h({api:"save"})]}})})},setCommandBars:function(e){return n(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,g];case 1:return t.sent(),_(e),[2]}})})},updateConfig:function(e){return void 0===e&&(e={}),n(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,g];case 1:return t.sent(),e.commandBars?(console.warn("Deprecated: `updateConfig()` 方法即将废弃，请使用`setCommandBars()`代替`updateConfig()`更新`commandBars`配置。"),[4,_(e.commandBars)]):[3,3];case 2:t.sent(),t.label=3;case 3:return[2]}})})},executeCommandBar:function(e){return n(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,g];case 1:return t.sent(),_([{cmbId:e,attributes:[{name:"click",value:!0}]}]),[2]}})})},on:function(e,t){return n(this,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,g];case 1:return n.sent(),e===H.fileSaved&&console.warn("fileSaved事件监听即将弃用， 推荐使用fileStatus进行文件状态的监听"),q(w,e,"on"),j.on(e,t),[2]}})})},off:function(e,t){return n(this,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,g];case 1:return n.sent(),q(w,e,"off"),j.off(e,t),[2]}})})}},function(e,t,n,r,a){t&&u(t)&&(a.refreshToken=t,e.refreshToken={eventName:R.getToken});n&&u(n)&&(a.onToast=n,e.onToast={eventName:R.onToast});r&&u(r)&&(a.onHyperLinkOpen=r,e.onHyperLinkOpen={eventName:R.onHyperLinkOpen})}(t,d,p,b,O),M(D,j,t,i,O,w,k),D}catch(e){console.error(e)}var x}function q(e,t,n){var r=t;if(!["error","fileOpen"].includes(r)){"fileSaved"===r&&(r="fileStatus");var a={eventName:"basic.event",data:{eventName:r,action:n}};e.contentWindow.postMessage(JSON.stringify(a),"*")}}console.log("WebOfficeSDK JS-SDK V1.1.5");var z=Object.freeze({__proto__:null,listener:M,config:W});window.WPS=z;var G=W,J={config:G};e.config=G,e.default=J,Object.defineProperty(e,"__esModule",{value:!0})});

    </script>
    <script type="text/javascript">
        initWebOfficeSDK()
        function GetQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
            var r = window.location.search.substr(1).match(reg); //获取url中"?"符后的字符串并正则匹配
            var context = "";
            if (r != null)
                context = decodeURIComponent(r[2]);
            reg = null;
            r = null;
            return context == null || context == "" || context == "undefined" ? "" : context;
        }
        function initWebOfficeSDK() {
            const realUrl = GetQueryString('realUrl')
            const token = GetQueryString('token')
            var demo = WebOfficeSDK.config({
                mount: document.getElementById('editor'),
                url: realUrl,
                mode: 'simple',
            });
            demo.setToken({ token });
            demo.on('fileOpen', function (data) {
                // alert(JSON.stringify(data))
            })
            demo.on('error', function (data) {
                // alert('err = ' + JSON.stringify(data))
            })
        }
    </script>
</body>

</html>